<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtWebApp: stefanfrings::Logger Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QtWebApp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classstefanfrings_1_1Logger.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="classstefanfrings_1_1Logger-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">stefanfrings::Logger Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Decorates and writes log messages to the console, stderr.  
 <a href="classstefanfrings_1_1Logger.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="logger_8h_source.html">logger.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for stefanfrings::Logger:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1Logger__inherit__graph.png" border="0" usemap="#astefanfrings_1_1Logger_inherit__map" alt="Inheritance graph"/></div>
<map name="astefanfrings_1_1Logger_inherit__map" id="astefanfrings_1_1Logger_inherit__map">
<area shape="rect" title="Decorates and writes log messages to the console, stderr." alt="" coords="139,80,291,107"/>
<area shape="rect" href="classstefanfrings_1_1DualFileLogger.html" title="Writes log messages into two log files simultaneously." alt="" coords="5,155,211,181"/>
<area shape="rect" href="classstefanfrings_1_1FileLogger.html" title="Logger that uses a text file for output." alt="" coords="235,155,410,181"/>
<area shape="rect" title=" " alt="" coords="177,5,252,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for stefanfrings::Logger:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1Logger__coll__graph.png" border="0" usemap="#astefanfrings_1_1Logger_coll__map" alt="Collaboration graph"/></div>
<map name="astefanfrings_1_1Logger_coll__map" id="astefanfrings_1_1Logger_coll__map">
<area shape="rect" title="Decorates and writes log messages to the console, stderr." alt="" coords="5,80,157,107"/>
<area shape="rect" title=" " alt="" coords="44,5,119,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a002e7ed636e30aa9fa73bc08b96201d3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a002e7ed636e30aa9fa73bc08b96201d3">Logger</a> (QObject *parent)</td></tr>
<tr class="memdesc:a002e7ed636e30aa9fa73bc08b96201d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classstefanfrings_1_1Logger.html#a002e7ed636e30aa9fa73bc08b96201d3">More...</a><br /></td></tr>
<tr class="separator:a002e7ed636e30aa9fa73bc08b96201d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e5296c24964b38d93a2a13db532db33"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a2e5296c24964b38d93a2a13db532db33">Logger</a> (const QString <a class="el" href="classstefanfrings_1_1Logger.html#ab7dada738f69e822329edd76889bb758">msgFormat</a>=&quot;{timestamp} {type} {msg}&quot;, const QString <a class="el" href="classstefanfrings_1_1Logger.html#a04eed4523912a75a31d75589f9eb81db">timestampFormat</a>=&quot;dd.MM.yyyy hh:mm:ss.zzz&quot;, const QtMsgType <a class="el" href="classstefanfrings_1_1Logger.html#a032b8dabe616327d58e97b1a5c853f86">minLevel</a>=QtDebugMsg, const int <a class="el" href="classstefanfrings_1_1Logger.html#a9e6f76da976e3f09962c7613ad7aad8a">bufferSize</a>=0, QObject *parent=nullptr)</td></tr>
<tr class="memdesc:a2e5296c24964b38d93a2a13db532db33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classstefanfrings_1_1Logger.html#a2e5296c24964b38d93a2a13db532db33">More...</a><br /></td></tr>
<tr class="separator:a2e5296c24964b38d93a2a13db532db33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb668a9e186a25fbaad2e4af6d1ed00a"><td class="memItemLeft" align="right" valign="top"><a id="acb668a9e186a25fbaad2e4af6d1ed00a"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#acb668a9e186a25fbaad2e4af6d1ed00a">~Logger</a> ()</td></tr>
<tr class="memdesc:acb668a9e186a25fbaad2e4af6d1ed00a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:acb668a9e186a25fbaad2e4af6d1ed00a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af731fc45cf731695d5f971472032190d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#af731fc45cf731695d5f971472032190d">log</a> (const QtMsgType type, const QString &amp;message, const QString &amp;file=&quot;&quot;, const QString &amp;function=&quot;&quot;, const int line=0)</td></tr>
<tr class="memdesc:af731fc45cf731695d5f971472032190d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decorate and log the message, if type&gt;=minLevel.  <a href="classstefanfrings_1_1Logger.html#af731fc45cf731695d5f971472032190d">More...</a><br /></td></tr>
<tr class="separator:af731fc45cf731695d5f971472032190d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a333125f7ac75da148f3345ad4e5c49f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a333125f7ac75da148f3345ad4e5c49f3">installMsgHandler</a> ()</td></tr>
<tr class="memdesc:a333125f7ac75da148f3345ad4e5c49f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Installs this logger as the default message handler, so it can be used through the global static logging functions (e.g.  <a href="classstefanfrings_1_1Logger.html#a333125f7ac75da148f3345ad4e5c49f3">More...</a><br /></td></tr>
<tr class="separator:a333125f7ac75da148f3345ad4e5c49f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dc933a2f38098fc539f7e17fc39da41"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a4dc933a2f38098fc539f7e17fc39da41">clear</a> (const bool buffer=true, const bool variables=true)</td></tr>
<tr class="memdesc:a4dc933a2f38098fc539f7e17fc39da41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the thread-local data of the current thread.  <a href="classstefanfrings_1_1Logger.html#a4dc933a2f38098fc539f7e17fc39da41">More...</a><br /></td></tr>
<tr class="separator:a4dc933a2f38098fc539f7e17fc39da41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aeec74ca028bceb107a2337c5f6090432"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#aeec74ca028bceb107a2337c5f6090432">set</a> (const QString &amp;name, const QString &amp;value)</td></tr>
<tr class="memdesc:aeec74ca028bceb107a2337c5f6090432"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a thread-local variable that may be used to decorate log messages.  <a href="classstefanfrings_1_1Logger.html#aeec74ca028bceb107a2337c5f6090432">More...</a><br /></td></tr>
<tr class="separator:aeec74ca028bceb107a2337c5f6090432"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a69f50fe67efaa254ee219f6de384e9fa"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a69f50fe67efaa254ee219f6de384e9fa">write</a> (const <a class="el" href="classstefanfrings_1_1LogMessage.html">LogMessage</a> *logMessage)</td></tr>
<tr class="memdesc:a69f50fe67efaa254ee219f6de384e9fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decorate and write a log message to stderr.  <a href="classstefanfrings_1_1Logger.html#a69f50fe67efaa254ee219f6de384e9fa">More...</a><br /></td></tr>
<tr class="separator:a69f50fe67efaa254ee219f6de384e9fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ab7dada738f69e822329edd76889bb758"><td class="memItemLeft" align="right" valign="top"><a id="ab7dada738f69e822329edd76889bb758"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#ab7dada738f69e822329edd76889bb758">msgFormat</a></td></tr>
<tr class="memdesc:ab7dada738f69e822329edd76889bb758"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format string for message decoration. <br /></td></tr>
<tr class="separator:ab7dada738f69e822329edd76889bb758"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04eed4523912a75a31d75589f9eb81db"><td class="memItemLeft" align="right" valign="top"><a id="a04eed4523912a75a31d75589f9eb81db"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a04eed4523912a75a31d75589f9eb81db">timestampFormat</a></td></tr>
<tr class="memdesc:a04eed4523912a75a31d75589f9eb81db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Format string of timestamps. <br /></td></tr>
<tr class="separator:a04eed4523912a75a31d75589f9eb81db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a032b8dabe616327d58e97b1a5c853f86"><td class="memItemLeft" align="right" valign="top"><a id="a032b8dabe616327d58e97b1a5c853f86"></a>
QtMsgType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a032b8dabe616327d58e97b1a5c853f86">minLevel</a></td></tr>
<tr class="memdesc:a032b8dabe616327d58e97b1a5c853f86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum level of message types that are written out directly or trigger writing the buffered content. <br /></td></tr>
<tr class="separator:a032b8dabe616327d58e97b1a5c853f86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e6f76da976e3f09962c7613ad7aad8a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a9e6f76da976e3f09962c7613ad7aad8a">bufferSize</a></td></tr>
<tr class="memdesc:a9e6f76da976e3f09962c7613ad7aad8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of backtrace buffer, number of messages per thread.  <a href="classstefanfrings_1_1Logger.html#a9e6f76da976e3f09962c7613ad7aad8a">More...</a><br /></td></tr>
<tr class="separator:a9e6f76da976e3f09962c7613ad7aad8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:a724e09b39b88c5a880f2405a260949cb"><td class="memItemLeft" align="right" valign="top"><a id="a724e09b39b88c5a880f2405a260949cb"></a>
static QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1Logger.html#a724e09b39b88c5a880f2405a260949cb">mutex</a></td></tr>
<tr class="memdesc:a724e09b39b88c5a880f2405a260949cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to synchronize access of concurrent threads. <br /></td></tr>
<tr class="separator:a724e09b39b88c5a880f2405a260949cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Decorates and writes log messages to the console, stderr. </p>
<p>The decorator uses a predefined msgFormat string to enrich log messages with additional information (e.g. timestamp). </p>
<p>The msgFormat string and also the message text may contain additional variable names in the form <em>{name}</em> that are filled by values taken from a static thread local dictionary. </p>
<p>The logger can collect a configurable number of messages in thread-local FIFO buffers. A log message with severity &gt;= minLevel flushes the buffer, so the messages are written out. There is one exception: INFO messages are treated like DEBUG messages (level 0). </p>
<p>Example: If you enable the buffer and use minLevel=2, then the application waits until an error occurs. Then it writes out the error message together with all buffered lower level messages of the same thread. But as long no error occurs, nothing gets written out. </p>
<p>If the buffer is disabled, then only messages with severity &gt;= minLevel are written out. </p>
<p>The logger can be registered to handle messages from the static global functions qDebug(), qWarning(), qCritical(), qFatal() and qInfo().</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classstefanfrings_1_1Logger.html#aeec74ca028bceb107a2337c5f6090432" title="Sets a thread-local variable that may be used to decorate log messages.">set()</a> describes how to <a class="el" href="classstefanfrings_1_1Logger.html#aeec74ca028bceb107a2337c5f6090432" title="Sets a thread-local variable that may be used to decorate log messages.">set</a> logger variables </dd>
<dd>
<a class="el" href="classstefanfrings_1_1LogMessage.html" title="Represents a single log message together with some data that are used to decorate the log message.">LogMessage</a> for a description of the message decoration. </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>You should prefer a derived class, for example <a class="el" href="classstefanfrings_1_1FileLogger.html" title="Logger that uses a text file for output.">FileLogger</a>, because logging to the console is less useful. </dd></dl>

<p class="definition">Definition at line <a class="el" href="logger_8h_source.html#l00052">52</a> of file <a class="el" href="logger_8h_source.html">logger.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a002e7ed636e30aa9fa73bc08b96201d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a002e7ed636e30aa9fa73bc08b96201d3">&#9670;&nbsp;</a></span>Logger() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Logger::Logger </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>Uses the same defaults as the other constructor. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>Parent object </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00027">27</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<a id="a2e5296c24964b38d93a2a13db532db33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e5296c24964b38d93a2a13db532db33">&#9670;&nbsp;</a></span>Logger() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Logger::Logger </td>
          <td>(</td>
          <td class="paramtype">const QString&#160;</td>
          <td class="paramname"><em>msgFormat</em> = <code>&quot;{timestamp}&#160;{type}&#160;{msg}&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString&#160;</td>
          <td class="paramname"><em>timestampFormat</em> = <code>&quot;dd.MM.yyyy&#160;hh:mm:ss.zzz&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QtMsgType&#160;</td>
          <td class="paramname"><em>minLevel</em> = <code>QtDebugMsg</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>bufferSize</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>Possible log levels are: 0=DEBUG, 1=WARNING, 2=CRITICAL, 3=FATAL, 4=INFO </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgFormat</td><td>Format of the decoration, e.g. "{timestamp} {type} thread={thread}: {msg}" </td></tr>
    <tr><td class="paramname">timestampFormat</td><td>Format of timestamp, e.g. "dd.MM.yyyy hh:mm:ss.zzz" </td></tr>
    <tr><td class="paramname">minLevel</td><td>If bufferSize=0: Messages with lower level discarded.<br  />
 If buffersize&gt;0: Messages with lower level are buffered, messages with equal or higher level trigger writing the buffered content. </td></tr>
    <tr><td class="paramname">bufferSize</td><td>Size of the backtrace buffer, number of messages per thread. 0=disabled. </td></tr>
    <tr><td class="paramname">parent</td><td>Parent object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classstefanfrings_1_1LogMessage.html" title="Represents a single log message together with some data that are used to decorate the log message.">LogMessage</a> for a description of the message decoration. </dd></dl>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00036">36</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4dc933a2f38098fc539f7e17fc39da41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dc933a2f38098fc539f7e17fc39da41">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::clear </td>
          <td>(</td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>buffer</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>variables</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear the thread-local data of the current thread. </p>
<p>This method is thread safe. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>Whether to clear the backtrace buffer </td></tr>
    <tr><td class="paramname">variables</td><td>Whether to clear the log variables </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="classstefanfrings_1_1DualFileLogger.html#a4af0d2c35121b1f40dbd08b053a53ddf">stefanfrings::DualFileLogger</a>.</p>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00140">140</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<a id="a333125f7ac75da148f3345ad4e5c49f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a333125f7ac75da148f3345ad4e5c49f3">&#9670;&nbsp;</a></span>installMsgHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::installMsgHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Installs this logger as the default message handler, so it can be used through the global static logging functions (e.g. </p>
<p>qDebug()). </p>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00117">117</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<a id="af731fc45cf731695d5f971472032190d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af731fc45cf731695d5f971472032190d">&#9670;&nbsp;</a></span>log()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::log </td>
          <td>(</td>
          <td class="paramtype">const QtMsgType&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>file</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>function</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>line</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Decorate and log the message, if type&gt;=minLevel. </p>
<p>This method is thread safe. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>Message type (level) </td></tr>
    <tr><td class="paramname">message</td><td>Message text </td></tr>
    <tr><td class="paramname">file</td><td>Name of the source file where the message was generated (usually filled with the macro <b>FILE</b>) </td></tr>
    <tr><td class="paramname">function</td><td>Name of the function where the message was generated (usually filled with the macro <b>LINE</b>) </td></tr>
    <tr><td class="paramname">line</td><td>Line Number of the source file, where the message was generated (usually filles with the macro <b>func</b> or <b>FUNCTION</b>) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classstefanfrings_1_1LogMessage.html" title="Represents a single log message together with some data that are used to decorate the log message.">LogMessage</a> for a description of the message decoration. </dd></dl>

<p>Reimplemented in <a class="el" href="classstefanfrings_1_1DualFileLogger.html#a6db25d5c835b7221f0a6b7b4a035d4aa">stefanfrings::DualFileLogger</a>.</p>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00160">160</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<a id="aeec74ca028bceb107a2337c5f6090432"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeec74ca028bceb107a2337c5f6090432">&#9670;&nbsp;</a></span>set()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::set </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets a thread-local variable that may be used to decorate log messages. </p>
<p>This method is thread safe. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the variable </td></tr>
    <tr><td class="paramname">value</td><td>Value of the variable </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00128">128</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<a id="a69f50fe67efaa254ee219f6de384e9fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69f50fe67efaa254ee219f6de384e9fa">&#9670;&nbsp;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Logger::write </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classstefanfrings_1_1LogMessage.html">LogMessage</a> *&#160;</td>
          <td class="paramname"><em>logMessage</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Decorate and write a log message to stderr. </p>
<p>Override this method to provide a different output medium. </p>

<p>Reimplemented in <a class="el" href="classstefanfrings_1_1FileLogger.html#a9258a5e72c22a6b14e25af8eae2092c1">stefanfrings::FileLogger</a>.</p>

<p class="definition">Definition at line <a class="el" href="logger_8cpp_source.html#l00110">110</a> of file <a class="el" href="logger_8cpp_source.html">logger.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a9e6f76da976e3f09962c7613ad7aad8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e6f76da976e3f09962c7613ad7aad8a">&#9670;&nbsp;</a></span>bufferSize</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int stefanfrings::Logger::bufferSize</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Size of backtrace buffer, number of messages per thread. </p>
<p>0=disabled </p>

<p class="definition">Definition at line <a class="el" href="logger_8h_source.html#l00131">131</a> of file <a class="el" href="logger_8h_source.html">logger.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>logging/<a class="el" href="logger_8h_source.html">logger.h</a></li>
<li>logging/<a class="el" href="logger_8cpp_source.html">logger.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>stefanfrings</b></li><li class="navelem"><a class="el" href="classstefanfrings_1_1Logger.html">Logger</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
